package com.example.http.sczw.controller;

import com.example.http.sczw.service.ForwardSczwRequestProxyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.net.URISyntaxException;

/**
 * @author zhouxl
 * @DATE 2021/8/31
 * @descriptoin
 */
@RestController
@RequestMapping("/api/sczw/proxy")
public class ForwardSczwRequestProxyController {

    @Autowired
    private ForwardSczwRequestProxyService forwardSczwLoginInfo;

    /**
     *  转发四川政务服务网信息
     */
    @RequestMapping("forwardSczwLoginInfo")
    public String forwardSczwLoginInfo(HttpServletRequest request) throws IOException, URISyntaxException {
        return forwardSczwLoginInfo.forwardSczwLoginInfo(request);
    }

    @RequestMapping("nginxProxySczwLoginInfo")
    public String nginxProxySczwLoginInfo(HttpServletRequest request) throws IOException, URISyntaxException {
        return forwardSczwLoginInfo.nginxProxySczwLoginInfo(request);
    }

}
